<template>
  <div class="common-title">
    <div class="text">{{ title }}</div>
    <div class="return" @click="back">返回</div>
  </div>
</template>

<script setup>

import { useRouter } from "vue-router"
const router = useRouter();

const props = defineProps(['title', 'url']);

const back = ()=>{
    router.push(props.url)
}

</script>

<style scoped>
.common-title{
  padding:10px 20px;
  font-size:20px;
  background-color:#409eff;
  color:white;
  min-height:30px;
}
.common-title .text{
  float:left;
}
.common-title .return{
  float:right;
  padding-top:5px;
  font-size:15px;
}
</style>